using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Resources;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;

namespace KPIS.GERP.Models.ICM
{
	[DataContract, Table("IcmStockMovementDtls")]
    public class StockMovementDtls
    {
        public StockMovementDtls()
        {
            this.StockMms = new HashSet<StockMovementDtls>();
            
        }

		[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
		[DataMember, Display(Name = "StockmmDtlsId", ResourceType = typeof(Resources.StockMovementDtlsResource))]
        public int StockmmDtlsId { get; set; }

        [ForeignKey("StockMm")]
		[DataMember, Display(Name = "StockMmId", ResourceType = typeof(Resources.StockMovementDtlsResource))]
        public int StockMmId { get; set; }

		[ForeignKey("ItemLot")]
		[DataMember, Display(Name = "IcmItemLotId", ResourceType = typeof(Resources.StockMovementDtlsResource))]
        public string IcmItemLotId { get; set; }

        [ForeignKey("Request")]
		[DataMember, Display(Name = "ReqId", ResourceType = typeof(Resources.StockMovementDtlsResource))]
        public Nullable<int> ReqId { get; set; }

		[DataMember, Display(Name = "ReqSeqNo", ResourceType = typeof(Resources.StockMovementDtlsResource))]
        public Nullable<int> ReqSeqNo { get; set; }

		[DataMember, Display(Name = "CreatedBy", ResourceType = typeof(Resources.StockMovementDtlsResource))]
        public Nullable<int> CreatedBy { get; set; }

		[DataMember, Display(Name = "CreatedWhen", ResourceType = typeof(Resources.StockMovementDtlsResource))]
        public Nullable<System.DateTime> CreatedWhen { get; set; }

		[DataMember, Display(Name = "UpdatedBy", ResourceType = typeof(Resources.StockMovementDtlsResource))]
        public Nullable<int> UpdatedBy { get; set; }

		[DataMember, Display(Name = "UpdatedWhen", ResourceType = typeof(Resources.StockMovementDtlsResource))]
        public string UpdatedWhen { get; set; }

        [DataMember ]
        public virtual ICollection<StockMovementDtls> StockMms { get; set; }

        [DataMember ]
        public virtual ICollection<StockMovementDtls> ItemLots { get; set; }

        public virtual StockMovementDtls StockMm { get; set; }

        // public virtual Item ItemLot { get; set; }

		public virtual RequestParcel Req { get; set; }

    }
}